package app;

import android.app.Application;
import android.util.DisplayMetrics;
import android.view.WindowManager;

import com.lidroid.xutils.DbUtils;

import utils.DBUtils;
import utils.DownloadUtils;


public class LingShiJiaApp extends Application {

    private static float scales;
    @Override
    public void onCreate() {
        super.onCreate();
        DownloadUtils.initHttpUtils(this);
        DownloadUtils.initImageLoader();
        DBUtils.createDB(getApplicationContext());
        DisplayMetrics metrics = new DisplayMetrics();
        WindowManager windowManager = (WindowManager) getSystemService(getApplicationContext().WINDOW_SERVICE);
        windowManager.getDefaultDisplay().getMetrics(metrics);
        scales =  metrics.density;
    }

    public static float getScale()
    {

        return  scales;
    }
}
